Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPersistentObject


CloneInto

The CloneInto method clones this persistent object by copying its data into the specified storage unit.

void CloneInto (in ODDraftKey key, 
                in ODStorageUnit toSU,
                in ODFrame scope);
key
The draft key identifying the current cloning operation, expressed as a 32-bit value. The key provides thread-safe access to cloning.
toSU
A reference to the destination storage unit to which the data is to be copied.
scope
A reference to the frame object that defines the scope of the cloning operation.
DISCUSSION
Your part should never call this method directly; it is called by the draft's Clone or WeakClone methods.

The scope parameter determines which of the referenced objects are within the scope of this cloning operation. Typically, the scope parameter is a reference to a frame and only those objects embedded in that frame are within the scope. In the rare case in which the scope parameter is kODNULL, all referenced objects are within the scope.

This method copies this object's data into the specified destination storage unit and clones any additional objects to which this object has strong and weak persistent references and that are within the scope of this cloning operation. Objects referenced by strong persistent references are strongly cloned by recursive calls to the Clone method; objects referenced by weak persistent references are weakly cloned by calls to the WeakClone method. Otherwise, only those objects logically enclosed in the specified frame are within the scope and should be cloned.

OVERRIDING
Every subclass of ODPersistentObject must override the CloneInto method to support data transfer of internal data. The override method must call its inherited CloneInto method at the beginning of its implementation.

SEE ALSO
The ODDraftKey type (page 902).
The ODDraft::Clone method (page 161).
The ODDraft::WeakClone method (page 183).
The ODPart class (page 459).
"The CloneInto Method" on page 104 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"The Cloning Sequence" on page 321 in OpenDoc Programmer's Guide.
"The CloneInto Method of Your Part Editor" on page 327 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help